# -*- coding:utf-8 -*-
# 类方法

class TestClassMethod:
    name = '李雷'

    def __init__(self):
        self.age = 18
        print('init TestClassMethod')

    @classmethod
    def classMethod(cls):
        print(cls.name)


# 类调用类方法
TestClassMethod.classMethod()  # 李雷

test = TestClassMethod()
# 对象调用类方法
test.classMethod()
